for a in range(100,1000):
    b = a//100
    c = a//10 % 10
    d = a % 10
    if a == b**3 + c**3 + d**3:
        print(a,end=' ')
input('press any key to continue...')